import Vue from "vue";
import store from "@/store";
import { registerApps } from "@/qiankun-main/registerApps";
import {
  qiankunActions,
  registerStateModule,
} from "@/qiankun-main/globalState";

// qiankun 出口文件，将所需对象和方法挂载到vue的原型链上
const QianKun = {
  install: () => {
    const $qiankun = {
      registerApps,
      ...qiankunActions,
    };
    Vue.prototype.$qiankun = $qiankun;
    registerStateModule(store);
  },
};
export default QianKun;
